﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using System.Threading.Tasks;
using RMM.AdminOrderService;
using RMM.Orders.Dtos;


namespace RMM.Web.Controllers.Order
{
    public class OrderController : BaseController
    {
        private readonly IOrderAdminService  _orderAdminService;

        public OrderController(IOrderAdminService orderAdminService)
        {
            _orderAdminService = orderAdminService;
        }

        // GET: Order
        public ActionResult Index()
        {
            return View();
        }

        public async Task<ActionResult> GetOrderListAsync()
        {
            var order = await _orderAdminService.GetOrderlistAsync();
            return Jsons(order);
        }
    }
}